/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package traffic.light.simulator.town.unity;

/**
 *
 * 
 */
public enum CrossRoadType {
    
    /*      | 
     *      |
     * -----|-----
     * 
     * 
     */
    TYPE_0,    
    
    /*      | 
     *      |
     * -----|-----
     *      |
     *      |
     */
    TYPE_1,
    
    /*       
     *      
     * -----|-----
     *      |
     *      |
     */
    TYPE_2,
    
    /*       
     *      
     * -----------
     *      
     *      
     */
    TYPE_3,
    
    /*      | 
     *      |
     *      |
     *      |
     *      |
     */
    TYPE_4,
    
    /*      |
     *      |
     *      |-----
     *      |
     *      |
     */
    TYPE_5,
    
    /*      |
     *      |
     *  ----|
     *      |
     *      |
     */
    TYPE_6,
    
    /*      
     *      
     *      |----
     *      |
     *      |
     */
    TYPE_7,
    
    /*      
     *  ----|
     *      |
     *      |
     */
    TYPE_8,
    
    /*      |
     *      |
     *      |----
     *      
     *      
     */
    TYPE_9,
    
    /*      |
     *      |
     *  ----|    
     *      
     *      
     */
    TYPE_10,
    
    /*     
     *     
     *   
     *      
     *      
     */
    TYPE_11;

    public static CrossRoadType getCrossRoadType(int id){
        switch (id){
        case 0:
           return TYPE_0;
        case 1:
           return TYPE_1;
        case 2:
            return TYPE_2;
        case 3:
            return TYPE_3;
        case 4:
           return TYPE_4;
        case 5:
            return TYPE_5;
        case 6:
            return TYPE_6;
        case 7:
           return TYPE_7;
        case 8:
            return TYPE_8;
        case 9:
            return TYPE_9;
        case 10:
            return TYPE_10;
        default:
            return TYPE_11;
        }
    }
    public static int getInt(CrossRoadType crt){
        switch (crt){
        case TYPE_0:
           return 0;
        case TYPE_1:
           return 1;
        case TYPE_2:
            return 2;
        case TYPE_3:
            return 3;
        case TYPE_4:
           return 4;
        case TYPE_5:
            return 5;
        case TYPE_6:
            return 6;
        case TYPE_7:
           return 7;
        case TYPE_8:
            return 8;
        case TYPE_9:
            return 9;
        case TYPE_10:
            return 10;
        default:
            return 11;
        }
    }
}
